<template>
  <div class="main">
    <div class="left">
      <studentMainleft></studentMainleft>
    </div>
    <div class="right">
      <div class="title">
        <el-button type="primary" @click="addworker">添加职工</el-button>
      </div>
      <template>
        <el-table :data="worderList" style="width: 100%">
          <el-table-column prop="WorkerName" label="职工姓名" width="180"></el-table-column>
          <el-table-column prop="WorkerId" label="职工编号" width="180"></el-table-column>
          <el-table-column prop="WorkerPhone" label="职工电话"></el-table-column>
          <el-table-column prop="WorkerAge" label="职工年龄"></el-table-column>
          <el-table-column prop="WorkerSex" label="职工性别"></el-table-column>
          <el-table-column prop="WorkerEmail" label="职工邮箱"></el-table-column>
          <el-table-column prop="WorkerCarid" label="职工身份证"></el-table-column>
          <el-table-column prop="WorkerLocal" label="职工籍贯"></el-table-column>
        </el-table>
      </template>
    </div>
    <el-dialog title="添加职工" :visible.sync="dialogFormVisible">
    </el-dialog>
  </div>
</template>

<script>
import studentMainleft from "@/components/studentMainleft";
export default {
  components: {
    studentMainleft
  },
  data() {
    return {
        dialogFormVisible:false,
      worderList: []
    };
  },
  created() {
    this.GetAllWorker();
  },
  mounted() {},
  methods: {
    addworker() {
        this.dialogFormVisible = true
    },
    GetAllWorker() {
      this.$axios({
        method: "get",
        url: this.$api.GetAllWorker,
        data: {},
        params: {}
      }).then(res => {
        console.log(res);
        this.worderList = res.data.message;
      });
    }
  }
};
</script>

<style scoped>
.main {
  display: flex;
  height: 100%;
}
.right {
  width: 100%;
  background-color: white;
  height: 80%;
  margin-left: 10px;
  padding: 0px 20px 0 20px;
}
</style>
